From: Andrew Cooper Date: Tue, 4 Mar 2014 09:55:56 +0000 (+0100) Subject: x86/time: avoid redundant this_cpu() X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5529 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:///%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22man:/?a=commitdiff_plain;h=58bebfdb790c5639d28d5e1b5fd49a3352c5fc25;p=xen.git x86/time: avoid redundant this_cpu() this_cpu() makes use of RELOC_HIDE() to prevent unsafe optimisations, forcing a recalculation of the per-cpu data area. Don't use it needlessly. Signed-off-by: Andrew Cooper --- diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index b2c8dc7359..000191b945 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1323,7 +1323,7 @@ void init_percpu_time(void) s_time_t now; /* Initial estimate for TSC rate. */ - this_cpu(cpu_time).tsc_scale = per_cpu(cpu_time, 0).tsc_scale; + t->tsc_scale = per_cpu(cpu_time, 0).tsc_scale; local_irq_save(flags); rdtscll(t->local_tsc_stamp);